/**
 * 
 */
package cn.softTank.BpelModelImpl;

import org.dom4j.DocumentHelper;
import org.dom4j.Element;

import cn.softTank.BpelModel.Link;

/**
 * @author Yuzone (smartzxy@gmail.com)
 *
 */
public class LinkImpl implements Link {

	private String name;
	
	/* (non-Javadoc)
	 * @see cn.softTank.BpelModel.Link#getName()
	 */
	@Override
	public String getName() {
		return this.name;
	}

	/* (non-Javadoc)
	 * @see cn.softTank.BpelModel.Link#setName(java.lang.String)
	 */
	@Override
	public void setName(String name) {
		this.name=name;
	}

	/* (non-Javadoc)
	 * @see cn.softTank.BpelModel.XmlAdapt#toElement()
	 */
	@Override
	
	public Element toElement() {
		Element e=DocumentHelper.createElement("link");
		if(name!=null)
			e.addAttribute("name", name);
		return e;
	}

	/* (non-Javadoc)
	 * @see cn.softTank.BpelModel.XmlAdapt#toXml()
	 */
	@Override
	public String toXml() {
		// TODO Auto-generated method stub
		return null;
	}

}
